package com.duguo.dynamicmvc.model.resolver;

import javax.servlet.http.HttpServletRequest;

public class ExceptionResolver {
	
	public static String EXCEPTION_KEY="exception";
	
	public Exception resolve(HttpServletRequest request){
		Exception exception=(Exception)request.getAttribute(EXCEPTION_KEY);
		if(exception!=null){
			request.removeAttribute(EXCEPTION_KEY);
		}
		return exception;
	}

}
